﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using deal_h2ck.DTO;

namespace deal_h2ck.Data_Access
{
    public class KhachHangDAO
    {
        
        public static bool DangKyThanhVien(CKhachHangDTO kh)
        {
            
            string sql = string.Format("insert into values({0},{1},{2},{3},{4},{5},{6},{7},{8})",
                kh.HoTen,kh.Email,kh.Password,kh.SDT,kh.NgaySinh,kh.NgayDangKy,kh.DiaChi,kh.LoaiKH);
            return SqlDataProvider.ExecuteQuery(sql);
        }
        public static bool DangNhap(CKhachHangDTO kh)
        {
            string sql = string.Format("select * from KHACHHANG where email='{0}' and password='{1}'",kh.Email,kh.Password);
            return SqlDataProvider.ExecuteQuery(sql);
        }
    }
}